package com.py.credit.dao;

import com.py.credit.entity.Application;
import com.py.credit.entity.CheckReport;
import com.py.framework.core.common.Page;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CheckReportDao {

	/**
	 * 添加核查报告申请
	 * @param application
	 */
	public void addApplicationInfo(Application application);

	public Application selectApplicationInfo(@Param(value = "id") int id);
	
	public CheckReport selectCheckReportInfo(@Param(value = "id") int id);

	public String selectTybmByQymc(@Param(value = "qymc") String qymc);

	public void updateApplication(@Param(value = "id") int id,
								  @Param(value = "managerDate") String managerDate,
								  @Param(value = "status") String status,
								  @Param(value = "pdfpath") String pdfpath);
	
	public void updateCheckReport(@Param(value = "id") int id,
			  @Param(value = "checkTime") String checkTime,
			  @Param(value = "checkStatus") String checkStatus,
			  @Param(value = "pdfpath") String pdfpath);

	public List<Application> selectApplicationInfoList(@Param(value = "userId") int userId);
	
	public List<CheckReport> selectCheckReportInfoList(@Param(value = "userId") int userId);
	
	/**
	 * 获取列表
	 * 
	 * @return
	 */
	public List<CheckReport> selectByConditionForPage(@Param(value = "columns") List<String> columns,
			@Param(value = "additionalColumns") String[] additionalColumns,
			@Param(value = "conditions") List<String> conditions, @Param(value = "page") Page page,
			@Param(value = "checkStatus") String checkStatus,@Param(value = "addTimeStart") String addTimeStart,
			@Param(value = "addTimeEnd") String addTimeEnd,@Param(value = "userId") int userId);
	
	public int addCheck(CheckReport checkReport);
	public Map selectUserInfo(@Param(value = "id") Integer id);
	
	public Map selectUserInfoByUserId(@Param(value = "userId") Integer userId);
}
